<?php
class roleLibrary extends Zend_Acl
{
	public function __construct()
	{
		$this->addResource(new Zend_Acl_Resource('admin_resource'));
		$this->addResource(new Zend_Acl_Resource('add'),'admin_resource');
		$this->addResource(new Zend_Acl_Resource('delete'),'admin_resource');
		
		$this->addResource(new Zend_Acl_Resource('mod_resource'));
		$this->addResource(new Zend_Acl_Resource('add'),'mod_resource');
		$this->addResource(new Zend_Acl_Resource('delete'),'mod_resource');
		
		$this->addrole(new Zend_Acl_Role('mod'));
		$this->addrole(new Zend_Acl_Role('admin'),'mod');
		
		$this->allow('mod','mod_resource','add');
		$this->allow('mod','mod_resource','delete');
		
		$this->allow('admin','admin_resource','add');
		$this->allow('admin','admin_resource','delete');		
	}
}